home *** CD-ROM | disk | FTP | other *** search
- ;This funcion sets up and array of Integers, Reals or
- ;Letters. The array direction may be positive or neg-
- ;ative and the value step can be any increment.
- ;
- ;Function name "EDSARRAY.LSP" - Execution command "AR"
- ;
- ;Written by Christopher Conrad and Steve Brown
- ;
- ;
- ;
- (defun c:ar ()
- (setq flet "a")
- (setq charval 65)
- (setq pnt (getpoint "Origin of array : "))
- (setq ynum (getint "Number of rows : "))
- (setq xnum (getint "Number of columns : "))
- (setq dy (getreal "Distance between rows (real number) : "))
- (setq dx (getreal "Distance between columns (real number) : "))
- (setq just (getstring "Justification : "))
- (setq tsiz (getstring "Text size : "))
- (setq rot (getstring "Rotation : "))
- (setq txtype (getstring "Real, Integer, or Letters (R,I,or L) :
- "))
- (if (= txtype "L")
- (setq flet (getstring "First letter : "))
- (if (= txtype "I")
- (progn (setq fnum (getint "First integer : "))
- (setq incr (getint "Increment : ")))
- (progn (setq fnum (getreal "First real : "))
- (setq incr (getreal "Increment : "))
- (setq sigdig (getint "Number of significant digits :
- ")))
- )
- )
- ;
- (setq txtval 0)
- (setq fcv (ascii flet))
- (setq ycount 0) (setq xcount 0)
- (while (< ycount ynum)
- (while (< xcount xnum)
- (setq xpnt (+ (car pnt) (* DX xcount)))
- (setq ypnt (+ (cadr pnt) (* DY ycount)))
- (setq txloc (list xpnt ypnt))
-
- ;determine text
- (if (= txtype "L")
- (progn (setq tx (+ fcv txtval))
- (setq text (chr tx)))
- (if (= txtype "I")
- (setq text (+ fnum (* incr txtval)))
- (progn (setq tx (* incr txtval))
- (setq tx (+ fnum tx))
- (setq text (rtos tx 2 sigdig)))
-
-
- )
- )
- (command "text" just txloc tsiz rot text)
- (setq txtval (1+ txtval))
- (setq xcount (1+ xcount))
- )
- (setq xcount 0)
- (setq ycount (1+ ycount))
- )
- )
-